<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%@page import="com.ecable.bean.ProfileTO;"%>
<%@ page errorPage="UserExceptionHandler.jsp"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path;
	String s;
%>
<%
	if (session.getAttribute("user") == null) {

		RequestDispatcher rd = request
				.getRequestDispatcher("/LoginForm.jsp");
		rd.forward(request, response);
%>
<%
	}
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>

		<script language="JavaScript"
			src="<%=request.getContextPath()
					+ "/scripts/gen_validatorv31.js"%>"
			type="text/javascript"></script>




	</head>

	<body>
		&nbsp;


		<jsp:include page="Header.jsp"></jsp:include>
		<br />
		<%
			Vector c = (Vector) request.getAttribute("userinfo");

			Iterator it = c.listIterator();
			int count = 0;
			if (it.hasNext()) {
				System.out.println("loop repeated" + count);
				ProfileTO aprofile = (ProfileTO) it.next();
				path = request.getRealPath("/images");
				s = path + "\\" + aprofile.getPhoto();
				System.out.println(s);
		%>



		<center>
			<h1><%=request.getAttribute("user")%>
				Details
			</h1>
		</center>

<center>
		<table bgcolor='#87CEEB'>

			<tr>
				<td align='right'>
					<b>UserID :</b>
				</td>
				<td>
					<input type=text value="<%=aprofile.getUserid()%>"
						readonly='readonly' />
				</td>
			</tr>

			<tr>
				<td align='right'>
				<b>Name : </b>
				</td>
				<td>
					<input type=text value="<%=aprofile.getFirstname()%>"
						readonly='readonly' />
				</td>
			</tr>


			<tr>
				<td align='right'>
				<b>Email :</b>
				</td>
				<td>
					<input type=text value=<%=aprofile.getEmail()%> readonly='readonly'>
				</td>
			</tr>


			<tr>
				<td align='right'>
					<b>Faxno :</b>
					<br>
				</td>
				<td bordercolor="#000000" bgcolor="#FFFFFF">
					<input type=text value=<%=aprofile.getFax()%> readonly='readonly' />
				</td>
			</tr>
			<tr>
				<td align='right'>
					<b>Phono No :</b>
					<br>
				</td>
				<td>
					<input type=text value='<%=aprofile.getPhone()%>'
						readonly='readonly' />
				</td>
			</tr>
			<tr>
				<td align='right'>
					<b>Photo :</b>
					<br>
				</td>
				<td>
					<img src="<%=s%>" height=100 width=100>
				</td>
			</tr>
			<tr>
			</tr>
		</table>
		</center>
		<%
			}
		%>

		<br />
		<jsp:include page="/Footer.jsp"></jsp:include>
	</body>
</html>
